package net.ermannofranco.genericdaojdbc.util;

public class Order {

	private final String field;
	private final boolean asc;

	private Order(String field, boolean asc) {
		this.field = field;
		this.asc = asc;
	}

	public String getField() {
		return field;
	}

	public boolean isAsc() {
		return asc;
	}

	public static Order asc(String field) {
		return new Order(field, true);
	}

	public static Order desc(String field) {
		return new Order(field, false);
	}
}
